package cn.kgc.springboot;

import cn.kgc.springboot.controller.HelloController;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/*
*   @SpringBootConfiguration    开启springboot的自动配置
    @EnableAutoConfiguration    开启第三方组件的自动配置
    @ComponentScan              开启包扫描    默认扫描    启动类所在的包及其子包
* */
@SpringBootApplication
public class SpringbootDay0102Application {

    public static void main(String[] args) {
        //启动spring容器
        ConfigurableApplicationContext run = SpringApplication.run(SpringbootDay0102Application.class, args);
        HelloController helloController = run.getBean("helloController", HelloController.class);
        System.out.println("helloController = " + helloController);
    }

}
